Optimal. Leaf size=54 \[ -\frac {b \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {a \log (\sin (c+d x))}{d}-\frac {b \sin (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 54, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2800, 780}
\begin {gather*} -\frac {a \csc ^2(c+d x)}{2 d}-\frac {a \log (\sin (c+d x))}{d}-\frac {b \sin (c+d x)}{d}-\frac {b \csc (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 780
Rule 2800
Rubi steps
\begin {align*} \int \cot ^3(c+d x) (a+b \sin (c+d x)) \, dx &=\frac {\text {Subst}\left (\int \frac {(a+x) \left (b^2-x^2\right )}{x^3} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac {\text {Subst}\left (\int \left (-1+\frac {a b^2}{x^3}+\frac {b^2}{x^2}-\frac {a}{x}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=-\frac {b \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {a \log (\sin (c+d x))}{d}-\frac {b \sin (c+d x)}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.14, size = 60, normalized size = 1.11 \begin {gather*} -\frac {b \csc (c+d x)}{d}-\frac {a \left (\cot ^2(c+d x)+2 \log (\cos (c+d x))+2 \log (\tan (c+d x))\right )}{2 d}-\frac {b \sin (c+d x)}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.22, size = 67, normalized size = 1.24
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+b \left (-\frac {\cos ^{4}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )\right )}{d}\) | \(67\) |
default | \(\frac {a \left (-\frac {\left (\cot ^{2}\left (d x +c \right )\right )}{2}-\ln \left (\sin \left (d x +c \right )\right )\right )+b \left (-\frac {\cos ^{4}\left (d x +c \right )}{\sin \left (d x +c \right )}-\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )\right )}{d}\) | \(67\) |
risch | \(i a x +\frac {i b \,{\mathrm e}^{i \left (d x +c \right )}}{2 d}-\frac {i b \,{\mathrm e}^{-i \left (d x +c \right )}}{2 d}+\frac {2 i a c}{d}-\frac {2 i \left (i a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{3 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}\right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{2}}-\frac {a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(121\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 45, normalized size = 0.83 \begin {gather*} -\frac {2 \, a \log \left (\sin \left (d x + c\right )\right ) + 2 \, b \sin \left (d x + c\right ) + \frac {2 \, b \sin \left (d x + c\right ) + a}{\sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 69, normalized size = 1.28 \begin {gather*} -\frac {2 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) + 2 \, {\left (b \cos \left (d x + c\right )^{2} - 2 \, b\right )} \sin \left (d x + c\right ) - a}{2 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (c + d x \right )}\right ) \cot ^{3}{\left (c + d x \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 23.21, size = 60, normalized size = 1.11 \begin {gather*} -\frac {2 \, a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) + 2 \, b \sin \left (d x + c\right ) - \frac {3 \, a \sin \left (d x + c\right )^{2} - 2 \, b \sin \left (d x + c\right ) - a}{\sin \left (d x + c\right )^{2}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 6.63, size = 146, normalized size = 2.70 \begin {gather*} \frac {a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}-\frac {10\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{2}+2\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a}{2}}{d\,\left (4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________